<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head th:include="/common/inc::header"/>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header header header-demo">
        <div class="layui-main">
            <ul class="layui-nav">
                <li class="layui-nav-item">
                    <a href="#" id="loginOut">退出登陆</a>
                </li>
            </ul>
        </div>
    </div>
    <div class="layui-side layui-bg-black x-side" id="menuTree">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree site-demo-nav" lay-filter="side">
                <template v-for="item in items">
                    <li class="layui-nav-item">
                        <a class="javascript:;" href="javascript:;">
                            <i class="layui-icon" style="top: 3px;">{{{item.iconcls}}}</i><cite>{{item.menuName}}</cite>
                        </a>
                        <dl class="layui-nav-child">

                            <template v-for="chind in item.chindren">
                                <dd class="">
                                    <a href="javascript:;" :data-href="chind.menuUrl" :data-id="chind.id">
                                        <cite>{{chind.menuName}}</cite>
                                    </a>
                                </dd>
                            </template>
                        </dl>
                    </li>
                </template>
            </ul>
        </div>
    </div>
    <div class="layui-tab layui-tab-card site-demo-title x-main" lay-filter="x-tab" lay-allowclose="true">
        <div class="x-slide_left"></div>
        <ul class="layui-tab-title">
        </ul>
        <div class="layui-tab-content site-demo site-demo-body">
        </div>
    </div>
    <div class="site-mobile-shade">
    </div>
</div>
<script th:replace="/common/inc::incJs"></script>
<script src="/js/index.js"></script>

<script>
    $('#loginOut').on('click', function () {
        layer.confirm('确认退出登录?', {icon: 3, title: '提示'}, function (index) {
            $.ajax({
                url: "/hotel/security/loginOut",
                type: "post",
                data: "",
                success: function (info) {
                    if (info.code < 0) {
                        layer.msg(info.message);
                        return false;
                    }
                    location.href = info.body;
                }
            })
        })
    });

    $('#changePsw').on('click', function () {
        openDialog({
            url: "/hotel/security/user/changePswInfo",
            area: ["30%", "45%"]
        });
    });

    $(function () {

    })
</script>
</body>
</html>

